<?php

ob_start();
if (isset($_POST['do-login']))
{
    $username   = isset($_POST['username']) ? $_POST['username'] : '';
    $password   = isset($_POST['password']) ? md5($_POST['password']) : '';
         
   
    @mysql_connect("localhost", "root", "") or die($ERROR1);
	@mysql_select_db("demo") or die("Loi cmnr");
	mysql_query("SET NAMES 'utf8'");
     
    
    $sql = "SELECT * FROM member WHERE username = '".$username."' AND password = '".$password."'";
     
    
    $result = mysql_query($sql);
     
   
    if (mysql_num_rows($result) > 0)
    {
        echo "dang nhap thanh cong";
		header("location: ../admin/index_logedin.html");
		
    }
    else {
        echo "sai ten user hoac password";
    }
	}

	
	?>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	